#
# Be sure to run `pod lib lint SWCordovaDefaultPlugins.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
  s.name             = 'SWCordovaDefaultPlugins'
  s.version          = '0.0.7'
  s.summary          = 'Plugin for Cordova.'

# This description is used to generate tags and improve search results.
#   * Think: What does it do? Why did you write it? What is the focus?
#   * Try to keep it short, snappy and to the point.
#   * Write the description between the DESC delimiters below.
#   * Finally, don't worry about the indent, CocoaPods strips it!

  s.description      = <<-DESC
TODO: Cordova插件库,提供所有Cordova插件.
                       DESC

  s.homepage         = 'http://git.evun.cn/ADMP-repository/sweet-iOS-CordovaPlugin'
  # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { 'Haisens' => 'haisens@163.com' }
  s.source           = { :git => 'https://gitlab.geely.com/p-admp/ios-common-kit/ios-sweetcordovaplugin.git', :tag => s.version.to_s }
  # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
  
  s.static_framework = true
  
#if ENV['mode'].to_s.include? "lib"
    #使用zip成果物模式
    puts "SWCordovaDefaultPlugins成果物模式集成".blue
    s.source           = { :http => 'https://geely-admp-oss.oss-cn-hangzhou.aliyuncs.com/sweet-app-release/ios/SWCordovaDefaultPlugins.framework-0.0.7.zip' }
    s.ios.vendored_framework   = 'SWCordovaDefaultPlugins.framework'
#else
#    #目前默认源码集成
#    s.source           = { :git => 'https://devops.geely.com/Products/AGP/_git/sweet-ios-cordova-common-plugins', :tag => s.version.to_s }
#    s.source_files = 'SWCordovaDefaultPlugins/Classes/*.{h,m}'
#    s.public_header_files = 'SWCordovaDefaultPlugins/Classes/*.h'
#end

  s.ios.deployment_target = '9.0'
  
  s.framework = [ "CoreTelephony", "SystemConfiguration", "CoreLocation" ]
  
  
  s.dependency 'SWCordovaKit'
  s.dependency 'AFNetworking'
  s.dependency 'QRCodeReaderViewController'
  s.dependency 'Base64'
  s.dependency 'SWFramework'
  s.dependency 'SWImageTools'
  s.dependency 'SWNetworkKit'
  
  s.pod_target_xcconfig  = {
    'FRAMEWORK_SEARCH_PATHS'        => '$(inherited) ${PODS_ROOT}/**',
    'LIBRARY_SEARCH_PATHS'          => '$(inherited) ${PODS_ROOT}/**',
    'OTHER_LDFLAGS'                 => '$(inherited) -ObjC',
    'STRINGS_FILE_OUTPUT_ENCODING'  => 'UTF-8',
    'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
    'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64'
  }
  
  s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
end
